package com.example.j2025_11_10.service;

import com.example.j2025_11_10.mapper.BatchDeleteBookMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import javax.swing.plaf.PanelUI;
import java.util.List;

@Service
public class BatchDeleteBookService {
    @Autowired
    public BatchDeleteBookMapper batchDeleteBookMapper;
    public String batchDeleteBook(List<Integer> ids){
        if(!ids.isEmpty()) {
            Integer deleteCount = batchDeleteBookMapper.batchDeleteBook(ids);
            if (deleteCount >= 1) {
                return "";
            }else {
                return "批量删除有误";
            }
        }
        return "没有选择数据";
    }

}
